package com.ccrfid.rmc6.service.open;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.personnel.PersonnelBloodPressureEntity;
import com.ccrfid.rmc6.entity.personnel.PersonnelHeartRateEntity;
import com.ccrfid.rmc6.entity.personnel.PersonnelTemperatureEntity;
import com.ccrfid.rmc6.pojo.dto.open2.CardHeartRateDto;
import com.ccrfid.rmc6.pojo.dto.open2.LocatePositionDto;
import com.ccrfid.rmc6.pojo.dto.open2.LocationDto;
import com.ccrfid.rmc6.pojo.dto.open2.OpenPersonnelDto;

import java.sql.Timestamp;
import java.util.List;

public interface OpenV2Service {
    //获取全部人员信息
    List<OpenPersonnelDto> getAllPersonnel();

    //根据人员监所唯一编号，获取某个人员信息
    OpenPersonnelDto getPersonnelBySn(String personnelSn) throws AppException;

    OpenPersonnelDto getPersonnelById(Long personnelId) throws AppException;

    //获取某人当前位置信息
    LocatePositionDto getPersonnelLocatePosition(String personnelSn)
            throws AppException;
    LocatePositionDto getPersonnelLocatePosition(Long personnelId)
            throws AppException;

    //获取某人某段时间内的历史轨迹
    List<LocatePositionDto> getPersonnelLocatePositionRecords(String personnelSn,
                                                              Timestamp startTime, Timestamp stopTime)
            throws AppException;

    //获取某个地图层级的区域信息
    List<LocationDto> getAllLocationsByMapLevel(Integer mapLevel);

    //获取某个区域内当前人员信息(总数/清单)
    List<OpenPersonnelDto> getPersonnelInLocationById(Long locationId) throws AppException;

    List<OpenPersonnelDto> getPersonnelInLocationBySn(String locationSn) throws AppException;

    //获取某个区域内(locationId)关联摄像头信息
    List<String> getCameraIdListInLocation(Long locationId);

    //获取某个标签某段时间内的计步数
    Integer getStepCountByCardNumber(Long cardNumber, Timestamp startTime, Timestamp stopTime) throws AppException;

    Integer getStepCountByPersonnelId(Long personnelId, Timestamp startTime, Timestamp stopTime) throws AppException;

    //获取某个标签某段时间内的心率记录
    List<CardHeartRateDto> getHeartRateRecordsByCardNumber(
            Long cardNumber, Timestamp startTime, Timestamp stopTime) throws AppException;

    List<PersonnelHeartRateEntity> getHeartRateRecordsByPersonnelId(
            Long personnelId, Timestamp startTime, Timestamp stopTime) throws AppException;

    //获取某个标签某段时间内的血压记录
    List<PersonnelBloodPressureEntity> getBloodPressureRecordsByCardNumber(
            Long cardNumber, Timestamp startTime, Timestamp stopTime) throws AppException;

    List<PersonnelBloodPressureEntity> getBloodPressureRecordsByPersonnelId(
            Long personnelId, Timestamp startTime, Timestamp stopTime) throws AppException;

    //获取某个标签某段时间内的体温记录
    List<PersonnelTemperatureEntity> getTemperatureRecordsByCardNumber(
            Long cardNumber, Timestamp startTime, Timestamp stopTime) throws AppException;

    List<PersonnelTemperatureEntity> getTemperatureRecordsByPersonnelId(
            Long personnelId, Timestamp startTime, Timestamp stopTime) throws AppException;
}
